
let rootURL = "http://192.168.124.17:8080"
function getData(url,optipns){
    return new Promise((resl,rej)=>{
        wx.request({
            url:rootURL+url,
            data:optipns,
            success:res=>{
                resl(res.data)
            }
        })
    })
}

let get_banner = optipns => getData("/banner/index/bannerList",optipns)
let get_singerList = optipns => getData("/artist/artistInfo",optipns)
let get_artistIntroduce = optipns => getData("/artist/artist",optipns)
let get_music = optipns => getData("/artist/artistMusic",optipns)
let get_musicUrl = optipns => getData("/api/v1/www/music/playUrl",optipns)
let get_searchKey = optipns => getData("/search/searchKey",optipns)
let get_searchMusic = optipns => getData("/search/searchMusicBykeyWord",optipns)

module.exports={
    get_banner,
    get_singerList,
    get_artistIntroduce,
    get_music,
    get_musicUrl,
    get_searchKey,
    get_searchMusic
}